var configManager=
{
	    "RequstUrl"			: "http://www.o2abc.com/"
	    ,"validateaddress"	: "http://api.map.baidu.com/geocoder/v2/?ak=YRy3onEQ3n0Wmdb20jLEHTaY&output=json&address={0}"
	    ,"avatarImgurl"		: "http://o2abc.com/img/avatar-{0}/{1}"
	    ,"storeImgurl"		: "http://o2abc.com/img/store-{0}/{1}"
	    ,"authImgurl"		: "http://o2abc.com/img/auth-{0}/{1}"
	    ,"goodsImgurl"      : "http://o2abc.com/img/goods-{0}/{1}"
	    ,"reviewImgurl"     : "http://o2abc.com/img/review-{0}/{1}"
	    ,"feedImgurl"     	: "http://o2abc.com/img/feed-{0}/{1}"
	     ,"adsImgurl"     	: "http://o2abc.com/img/ads-{0}/{1}"    
	    ,"alerttip"			: "掌创购"
	    ,"alertCtip"		: "确定"
	    ,"coinrate"			: "100" //金币和人民币兑换比率
	    ,"senddelay"		: 60	//发送短信的延迟时间 单位：秒
	    ,"paytype"			: { 
	    						"offline"		: "0", //到店刷卡支付
	    						"membercard"	: "1", //掌创购会员，余额支付
	    						"online"		: "2", //在线银行卡支付
	    						"alipay"		: "3", //支付宝支付
    							"webchat"		: "4", //微信支付
    						  }
	    ,"ordertag"			: { //个人
								"pay"			: "付款",
								"ordercode"		: "订单码",
								"consumecode" 	: "消费码",
								"unappraise"	: "待评价",
								"appraised"		: "已经评价",
								"refunding"		: "退款中",
								"refundsuccess"	: "已退款", //"退款成功"4个字占用空间太大 
								"refund"		: "退款",
								//商家
								"payed" 		: "已付款",
								"unconsumecode"	: "未消费",
								"unpay" 		: "未付款", 
								"agreerefund" 	: "退款中", //"同意退款"4个字占用空间太大
								"finish" 		: "交易完成",
								"applyrefund" 	: "申请退款",
								"close" 		: "取消"
	    					  }
}

var pageName = {
	"main":"main.html"
	,"home":"home.html"
	,"merchant":"../merchant/merchantlist.html"
	,"mine":"../mine/mine.html"
	,"more":"more.html"
	,"scanbarcode":"../../plus/barcode_scan.html"
	,"city":"../home/city.html"
}

var storageManager=
{
	    "currentcity"	: 'storagekeycurrentcity' // 当前城市
	    ,"HotCities"	: "storagekeyhotcities"
	    ,"AllCities"	: "storagekeyallcities"
	    ,"user"			: "user"
	    ,"searchtext"	:"searchtext"
	    ,"scanbarcode"     : "scanbarcodeInfo"
	    ,"cart"			: "cart"
	    ,"groupgoods" : "groupgoods" // 立即购买产品
	    ,"temporder"	: "temporder"
	    ,"bankcardinfo":"bankcardinfo"    // 银行卡信息
	    ,"isNewInstall": "isNewInstall" // 第一次安装
}

var errorMessage=
{
		  "system"	: '系统错误' // 当前城市
	    ,"network"	: "网络异常，请检查网络连接"
	    ,"interface":"您的网络太不给力了！"
}


//实现字符串trime
String.prototype.trim = function()
{
	return this.replace(/(^\s*)|(\s*$)/g, "");
}
//实现字符串format功能
String.prototype.format = function(args) {
    var result = this;
    if (arguments.length > 0) {    
        if (arguments.length == 1 && typeof (args) == "object") {
            for (var key in args) {
                if(args[key]!=undefined){
                    var reg = new RegExp("({" + key + "})", "g");
                    result = result.replace(reg, args[key]);
                }
            }
        }
        else {
            for (var i = 0; i < arguments.length; i++) {
                if (arguments[i] != undefined) {
                    var reg = new RegExp("({[" + i + "]})", "g");
                    result = result.replace(reg, arguments[i]);
                }
            }
        }
    }
    return result;
}
//实现Date的format功能
Date.prototype.Format = function (fmt) {
    var o = {
        "M+": this.getMonth() + 1, //月份 
        "d+": this.getDate(), //日 
        "h+": this.getHours(), //小时 
        "m+": this.getMinutes(), //分 
        "s+": this.getSeconds(), //秒 
        "q+": Math.floor((this.getMonth() + 3) / 3), //季度 
        "S": this.getMilliseconds() //毫秒 
    };
    if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
    for (var k in o)
    if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
    return fmt;
}
